package vista;
import java.awt.Color;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class FormProveedor extends javax.swing.JFrame {
	private JPanel jPanel1, jPanel2;
	private JLabel jLabel1, jLabel2, jLabel3, jLabel4, jLabel5, jLabel6;
	private JSeparator jSeparator3;
	private JButton bntBuscar;
	private JTextField TextCodigo, TextRazon, TextDireccion, TextTelefono, Textemail ;
	private JButton bntGuardar;
	private JButton bntEliminar;
	private JButton bntCancelar;
	private JButton bntSalir;
	private JSeparator jSeparator2;
	private JSeparator jSeparator1; 
	
	public FormProveedor() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			getContentPane().setBackground(Color.white);
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1);
				jPanel1.setBounds(50, 98, 379, 225);
				jPanel1.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
				jPanel1.setLayout(null);
				{
					jLabel2 = new JLabel();
					jPanel1.add(jLabel2);
					jLabel2.setText("Codigo");
					jLabel2.setBounds(19, 14, 55, 14);
				}
				{
					jLabel3 = new JLabel();
					jPanel1.add(jLabel3);
					jLabel3.setText("Razon Social");
					jLabel3.setBounds(16, 61, 100, 14);
				}
				{
					jLabel4 = new JLabel();
					jPanel1.add(jLabel4);
					jLabel4.setText("Direccion");
					jLabel4.setBounds(19, 104, 80, 14);
				}
				{
					jLabel5 = new JLabel();
					jPanel1.add(jLabel5);
					jLabel5.setText("Telefono");
					jLabel5.setBounds(19, 149, 75, 14);
				}
				{
					jLabel6 = new JLabel();
					jPanel1.add(jLabel6);
					jLabel6.setText("E-mail");
					jLabel6.setBounds(19, 193, 44, 14);
				}
				{
					TextCodigo = new JTextField();
					jPanel1.add(TextCodigo);
					TextCodigo.setBounds(115, 11, 151, 21);
				}
				{
					bntBuscar = new JButton();
					jPanel1.add(bntBuscar);
					bntBuscar.setText("B");
					bntBuscar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/buscar1.png")));
					bntBuscar.setBounds(293, 7, 67, 29);
				}
				{
					TextRazon = new JTextField();
					jPanel1.add(TextRazon);
					TextRazon.setBounds(115, 58, 150, 21);
				}
				{
					TextDireccion = new JTextField();
					jPanel1.add(TextDireccion);
					TextDireccion.setBounds(117, 101, 151, 21);
				}
				{
					TextTelefono = new JTextField();
					jPanel1.add(TextTelefono);
					TextTelefono.setBounds(117, 146, 151, 21);
				}
				{
					Textemail = new JTextField();
					jPanel1.add(Textemail);
					Textemail.setBounds(117, 190, 151, 21);
				}
				{
					jSeparator3 = new JSeparator();
					jPanel1.add(jSeparator3);
					jSeparator3.setBounds(11, 43, 359, 9);
				}
			}
			{
				jPanel2 = new JPanel();
				getContentPane().add(jPanel2);
				jPanel2.setBounds(20, 343, 447, 56);
				jPanel2.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
				jPanel2.setLayout(null);
				{
					bntGuardar = new JButton();
					jPanel2.add(bntGuardar);
					bntGuardar.setText("Guardar");
					bntGuardar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/aceptar.png")));
					bntGuardar.setFont(new java.awt.Font("Dialog",0,10));
					bntGuardar.setBounds(9, 7, 110, 38);
					bntGuardar.setLayout(null);
				}
				{
					bntCancelar = new JButton();
					jPanel2.add(bntCancelar);
					bntCancelar.setText("Cancelar");
					bntCancelar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/eliminar.png")));
					bntCancelar.setFont(new java.awt.Font("Dialog",0,10));
					bntCancelar.setBounds(254, 7, 114, 38);
				}
				{
					bntEliminar = new JButton();
					jPanel2.add(bntEliminar);
					bntEliminar.setText("Eliminar");
					bntEliminar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/eliminar1.png")));
					bntEliminar.setFont(new java.awt.Font("Dialog",0,10));
					bntEliminar.setBounds(131, 7, 112, 38);
				}
				{
					bntSalir = new JButton();
					jPanel2.add(bntSalir);
					bntSalir.setText("S");
					bntSalir.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/salir1.png")));
					bntSalir.setBounds(373, 8, 61, 37);
				}
			}
			{
				jLabel1 = new JLabel();
				getContentPane().add(jLabel1);
				jLabel1.setText("Datos del Proveedor");
				jLabel1.setBounds(73, 37, 336, 34);
				jLabel1.setFont(new java.awt.Font("Purisa",1,26));
			}
			{
				jSeparator1 = new JSeparator();
				getContentPane().add(jSeparator1);
				jSeparator1.setBounds(64, 71, 344, 7);
			}
			{
				jSeparator2 = new JSeparator();
				getContentPane().add(jSeparator2);
				jSeparator2.setBounds(64, 30, 344, 7);
			}
			pack();
			this.setSize(477, 438);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void addListener(ActionListener actionListener) {
		this.bntBuscar.addActionListener(actionListener);
		this.bntGuardar.addActionListener(actionListener);
		this.bntEliminar.addActionListener(actionListener);
		this.bntCancelar.addActionListener(actionListener);
		this.bntSalir.addActionListener(actionListener);
	}
	public void mostrarMensaje(String mensaje) {
		JOptionPane.showMessageDialog(this, mensaje);
	}
	public JTextField GetTextCodigo()
	{
	   return TextCodigo;
    }
	public void SetTextCodigo(String str)
	{
		TextCodigo.setText(str);
    }
	public JTextField GetTextRazon()
	{
	   return TextRazon;
    }
	public void SetTextRazon(String str)
	{
		TextRazon.setText(str);
    }
	public JTextField GetTextDireccion()
	{
	   return TextDireccion;
    }
	public void SetTextDireccion(String str)
	{
		TextDireccion.setText(str);
    }
	public JTextField GetTextTelefono()
	{
	   return TextTelefono;
    }
	public void SetTextTelefono(String str)
	{
		TextTelefono.setText(str);
    }
	public JTextField GetTextemail()
	{
	   return Textemail;
    }
	public void SetTextemail(String str)
	{
		Textemail.setText(str);
    }
	public void EnabledBntEliminar(boolean x)
	{
		bntEliminar.setEnabled(x);
	}
	public void EnabledBntGuardar(boolean x)
	{
		bntGuardar.setEnabled(x);
	}
	public void EnabledBntBuscar(boolean x)
	{
		bntBuscar.setEnabled(x);
	}
	public void EnabledTextCodigo(boolean x)
	{
		TextCodigo.setEnabled(x);
	}
	

}
